<template>
    <div v-for="(item_data, index) in item_list">
      <AdminItem :idx="index" :name="item_data.name" :description="item_data.description" :change_btn="change_btn" :delete_btn="delete_btn"></AdminItem>
    </div>
</template>

<script setup lang="ts">

import AdminItem from './AdminItem.vue'

interface item_type {
  name: string
  description: string
}

const props = defineProps({
  item_list: {
    type: Array<item_type>,
    default: [{name: 'service name', description: 'service description'}],
    required: true
  },
  change_btn: {
    type: String,
    default: '修改'
  },
  delete_btn: {
    type: String,
    default: '删除'
  }
});

</script>
